package com.lzc.tlmall.tlmallauthservice.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**注册信息
 * @author lzc
 * @create 2020-10-11 20:16
 */
@Data
public class RegistVo {

    @NotEmpty(message = "用户名不能为空")
    @Length(min =4,max = 20,message = "长度只能在4-20个字符之间")
    private String userName;
    @NotEmpty(message = "密码不能为空")
    @Length(min =6,max = 20,message = "长度只能在6-20个字符之间")
    private String password;
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = "^1[3|4|5|7|8][0-9]{9}$",message ="手机号格式不正确")
    private String phone;
}
